<div id="maincontent">

<%= render :partial => "shared_common_files/data_area_help_bar" %>

	<% for name in [:simplemsg] %>
    	<% if flash[name] %>
      		<%= "<div class='message-justmsg'> #{flash[name]} </div>" %>
    	<% end %>
  	<% end %>
  
    <% for name in [:notice, :warning, :message] %>
    	<% if flash[name] %>
      		<%= "<div class='message-fatal'> #{flash[name]} </div>" %>
    	<% end %>
  	<% end %>
	
<%if (params['node'] == "sugarcrm")%>
	
	<% if (params['name']=='Accounts')%>
		
		<h2>SugarCRM > Account > New</h2>
			
		<%= start_form_tag({:action => 'saverecord'},{:class => 'appform'}) %>
			<fieldset>
			
				<h3>Enter the following details</h3>
				
				<input class="f-name" type="hidden" name="module_name" required="true" value="<%=params['name']%>" size="30" />
				
				<label for="name"><b>Account Name :</b>
			  		<input class="f-name" type="text" name="account_name" required="true" size="30" /><br />
			  	</label>
		      
		      	<label for="name"><b>Phone Number :</b>
					<input class="f-name" type="text" name="phone_number" required="true" size="30" /><br />
			  	</label>
				
				<label for="name"><b>Website :</b>
			  		<input class="f-name" type="text" name="website" required="true" value="http://" size="30" /><br />
			  	</label>
		      
		      	<div class="f-submit-wrap">
			  		<%= image_submit_tag "/themes/odotclassic/images/btn_save.png",:alt => 'Save', :border => 0 %>
			  		<a href="javascript:history.go(-1);"><img src="/themes/odotclassic/images/btn_cancel.gif"/></a>
			  	</div>
	  
			</fieldset>
		<%=end_form_tag%>
	
	<% elsif (params['name']=='Leads')%>

		<h2>SugarCRM > Lead > New</h2>
			
		<%= start_form_tag({:action => 'saverecord'},{:class => 'appform'}) %>
			<fieldset>
				
				<h3>Enter the following details</h3>
				
				<input class="f-name" type="hidden" name="module_name" required="true" value="<%=params['name']%>" size="30" />
				
				<label for="name"><b>First Name :</b>
			  		<input class="f-name" type="text" name="first_name" required="true" size="30" /><br />
			  	</label>
		      
		      	<label for="name"><b>Last Name :</b>
					<input class="f-name" type="text" name="last_name" required="true" size="30" /><br />
			  	</label>
				
				<label for="name"><b>Email Address :</b>
			  		<input class="f-name" type="text" name="email_address" required="true" size="30" /><br />
			  	</label>
		      
		      	<div class="f-submit-wrap">
			  		<%= image_submit_tag "/themes/odotclassic/images/btn_save.png",:alt => 'Save', :border => 0 %>
			  		<a href="javascript:history.go(-1);"><img src="/themes/odotclassic/images/btn_cancel.gif"/></a>
			  	</div>
			  	
			</fieldset>
		<%=end_form_tag%>
		
	<% elsif (params['name']=='Opportunities')	%>

		<h2>SugarCRM > Opportunity > New</h2>
			
		<%= start_form_tag({:action => 'saverecord'},{:class => 'appform'}) %>
			<fieldset>
				
				<h3>Enter the following details</h3>
				
				<input class="f-name" type="hidden" name="module_name" required="true" value="<%=params['name']%>" size="30" />
				
				<label for="name"><b>Opportunity Name :</b>
					<input class="f-name" type="text" name="opportunity_name" required="true" size="30" /><br />
			  	</label>
				
				<label for="name"><b>Amount :</b>
			  		<input class="f-name" type="text" name="amount" required="true" size="30" /><br />
			  	</label>
			  	
			  	<div class="f-submit-wrap">
			  		<%= image_submit_tag "/themes/odotclassic/images/btn_save.png",:alt => 'Save', :border => 0 %>
			  		<a href="javascript:history.go(-1);"><img src="/themes/odotclassic/images/btn_cancel.gif"/></a>
			  	</div>
			  	
			</fieldset>
		<%=end_form_tag%>
		
	<% elsif (params['name']=='Cases')%>	

		<h2>SugarCRM > Case > New</h2>
			
		<%= start_form_tag({:action => 'saverecord'},{:class => 'appform'}) %>
			<fieldset>
			
				<h3>Enter the following details</h3>
				
				<input class="f-name" type="hidden" name="module_name" required="true" value="<%=params['name']%>" size="30" />
				
				<label for="name"><b>Case Name :</b>
					<input class="f-name" type="text" name="case_name" required="true" size="30" /><br />
			  	</label>
				
				<div class="f-submit-wrap">
			  		<%= image_submit_tag "/themes/odotclassic/images/btn_save.png",:alt => 'Save', :border => 0 %>
			  		<a href="javascript:history.go(-1);"><img src="/themes/odotclassic/images/btn_cancel.gif"/></a>
			  	</div>
			</fieldset>
		<%=end_form_tag%>
	
	<% elsif (params['name']=='Contacts')%>

		<h2>SugarCRM > Contact > New</h2>
			
		<%= start_form_tag({:action => 'saverecord'},{:class => 'appform'}) %>
			<fieldset>
				
				<h3>Enter the following details</h3>
				
				<input class="f-name" type="hidden" name="module_name" required="true" value="<%=params['name']%>" size="30" />
				
				<label for="name"><b>First Name :</b>
			  		<input class="f-name" type="text" name="first_name" required="true" size="30" /><br />
			  	</label>
		      
		      	<label for="name"><b>Last Name :</b>
					<input class="f-name" type="text" name="last_name" required="true" size="30" /><br />
			  	</label>
				
				<label for="name"><b>Email Address :</b>
			  		<input class="f-name" type="text" name="email_address" required="true" size="30" /><br />
			  	</label>
		      
		      	<div class="f-submit-wrap">
			  		<%= image_submit_tag "/themes/odotclassic/images/btn_save.png",:alt => 'Save', :border => 0 %>
                    <a href="javascript:history.go(-1);"><img src="/themes/odotclassic/images/btn_cancel.gif"/></a>
			  	</div>
			  	
			</fieldset>
		<%=end_form_tag%>
		
	<%end%>		
	
<%end%>
</div> 